import { Navigate } from 'umi'
 
const withAuth = (Component:any) => ()=>{
  const { isLogin } = useAuth();
  if (isLogin) {
    return <Component />;
  } else{
    return <Navigate to="/login" />;
  }
}

function useAuth(): { isLogin: any; } {
    throw new Error('Function not implemented.');
}
